package com.zb.controller;

import com.zb.exceptions.BusinessException;
import com.zb.util.ResultResponse;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {
/*测试111111*/
    @GetMapping("/test")
    public ResultResponse test(@RequestParam("num") Integer num) throws BusinessException {
        if (num == 0) {
            throw new BusinessException("测试异常");
        }
        return ResultResponse.success("操作成功！");
    }
}
